def my_enumerate(list_target):
    for i in range(len(list_target)):
        yield i, list_target[i]


for index, item in my_enumerate(['1', '2', '3', '4']):
    print(index, item)
